package com.hs.srm.admin.modules.orders.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 发货记录表实体类
 *
 * @author ych
 * @since 2020-04-22 15:21:23
 */
@Data
@TableName("deliver_record")
public class DeliverRecordEntity implements Serializable {
    private static final long serialVersionUID = -37031035852149837L;

    /**
     * 发货记录表id
     */
    @TableId(value = "pk_id", type = IdType.UUID)
    @TableField("pk_id")
    private String pkId;

    /**
     * 发货单号
     */
    @TableField("deliver_no")
    private String deliverNo;

    /**
     * 发货日期时间
     */
    @TableField("deliver_time")
    @JSONField(format = "yyyy-MM-dd")
    private Date deliverTime;

    /**
     * 行项目id
     */
    @TableField("po_item_id")
    private String poItemId;

    /**
     * 订单号
     */
    @TableField("po_no")
    private String poNo;

    /**
     * 行项目号
     */
    @TableField("item_no")
    private String itemNo;

    /**
     * 发货数量
     */
    @TableField("shipped_qty")
    private BigDecimal shippedQty;

    /**
     * 该发货记录是否添加到送货单：0，没有；1，该发货记录已生成送货单
     */
    @TableField("is_record")
    private BigDecimal isRecord;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public DeliverRecordEntity(String deliverNo, Date deliverTime, String poItemId, String poNo, String itemNo, BigDecimal shippedQty, Date createTime) {
        this.deliverNo = deliverNo;
        this.deliverTime = deliverTime;
        this.poItemId = poItemId;
        this.poNo = poNo;
        this.itemNo = itemNo;
        this.shippedQty = shippedQty;
        this.createTime = createTime;
    }
}